/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: zhongyisheng
 * Date: 2024-05-29
 * Time: 22:58
 */
public class Date {
    public int year;
    public int month;
    public int day;

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getDay() {
        return day;
    }

    public Date(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    @Override
    public String toString() {
        return "Date{" +
                "year=" + year +
                ", month=" + month +
                ", day=" + day +
                '}';
    }

    public void setDay(int day) {
        this.day = day;
    }

    public void setDate(int y, int mon, int day){
        this.year=y;
        this.month=mon;
        this.day=day;
    }
    public void printDate(){
        System.out.println("年"+this.year+'月'+this.month+'日'+this.day);
    }
    public static void main(String[] args) {
        Date date = new Date(1,2,3);
        date.setDate(1,2,3);
        date.printDate();
    }
}
